home *** CD-ROM | disk | FTP | other *** search
/ The Ultimate Human Body 2.0 / Ultimate Human Body 2.0, The (1996)(Dorling Kindersley).iso / dksetup / dksetup.bak < prev    next >
Text File  |  1996-09-23  |  39KB  |  996 lines

  1. '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  2. '   DKSETUP.MST     Generic Setup File
  3. '
  4. '   VERSION
  5. '   -------
  6. CONST STR_VERSION = "V 2.10.012"
  7. '
  8. '^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  9. 'Change History
  10. '--------------
  11. 'Version    Date        By  Description
  12. '-------    ----        --  -----------
  13. '2.10.012   10/06/96    SB Added code for installing DirectX II...
  14. '2.10.011   04/06/96    SB Fixed Bug with Developer... initalised bscrunged
  15. '2.10.010   23/05/96    SB  Created the Developer Dialog for installing either Scrunged or Text mode
  16. '2.10.009   02/04/96    CR  Re-Organised the groups of system drivers. No longer installs VFW
  17. '                           or the MSADPCM sound drivers on Windows 95.
  18. '2.10.008   10/04/96    CR  Stopped the user from being able to install to A:\.
  19. '                           It caused a crash on Win95.
  20. '2.10.007   03/04/96    CR  Removed the path in the device=dva.386 entry which is
  21. '                           put into system.ini. The Code is in UpdateWingDrivers in
  22. '                           Dkgen.inc. This stops a crash when installing Windows followed by
  23. '                           our product and then Office.
  24. '2.10.006   22/03/96    CR  Change the define WITH_SAMPLER_NOCM to WITH_FULL_SAMPLER.
  25. '                           This now installs the full sampler into the \DKMM\SAMPLER dir.
  26. '2.10.005   14/03/96    CR  Hide the Program Group window while adding the program icons.
  27. '2.10.004   27/02/96    CR  Changed most of the define names to make them more consistent.
  28. '2.10.003   27/02/96    CR  Added the INST_QTW define for installing QuickTime for Windows.
  29. '2.10.002   22/02/96    CR  The Fonts section in setup.inf needs a dummy placeholder
  30. '                           called NOFONT.ZZZ. Fonts are not registered for uninstall.
  31. '2.10.001   20/02/96    CR  Changed the setup files to separate Product Specific,
  32. '                           Localise Only and Generic information.
  33. '
  34. '16/02/96 Made the cursor 'Busy' while creating the program group/items.
  35. '14/02/96 Add the Sampler Icon name to the MMAPP.ini when using WITH_SAMPLER_NOCOM,
  36. '         so that uninstall can delete the Sampler Icon.
  37. '12/02/96 Added option to bundle sampler WITHOUT the Custom Menu.
  38. '25/01/96 Add WITH_ORDERING_INFO and MUSEUM_TITLE defines.
  39. '22/01/96 Fix the dialogs in the TestSystem function in Dkgen.inc.
  40. '15/12/95 Fix the Set Restart Directory problem when installing Win32s
  41. '14/12/95 Only delete files from the previous install if it was in a
  42. '         different directory. Otherwise it deletes the files just installed!
  43. '05/12/95 Reset the default install path when selecting back from the custom
  44. '         install dialog box and clear the copy list.
  45. '04/12/95 Move the mmapp.ini entry updates after the install.
  46. '31/11/95 Check the msacm.ini to make sure the audio compression is enabled.
  47. '29/11/95 Add the line in DKCODE\VERSION.INI to the main ini file. This is only
  48. '         used by the sampler3 product at the moment.
  49. '21/11/95 Can now handle a product + sampler3 bundle disc.
  50. '13/11/95 Add the Setup Version number to the About dialog box in the Setup.
  51. '08/11/95 Use the test for cirrus logic dirvers all of the time, not just
  52. '         when bundled with a sampler.
  53. '03/11/95 Cater for Win32s install and general tidy up of this script file.
  54. '         Unfortunately still need to use comments to select / deselect
  55. '         the specific font code parts.
  56. '18/08/95 rc and this have no min install. Changed dlg boxes custom,
  57. '         custom help and speed
  58. '18/08/95 Register notes most recent lang used
  59. '11/08/95 Register created using inf file
  60. '26/07/95 Uninstall code added
  61. '07/07/95 Correct dkgen.inc so unregisters use of ctl3d
  62. '04/07/95 Make sure files in bin section of inf file 'always' overwrite
  63. '28/07/95 Ini file not created for minimum install, uses file provided in dkcode
  64. '27/06/95 Test for directory names max 8 chars
  65. '26/06/95 For minimum install, ini file is now not installed
  66. '19/06/95 Moved test for cirrus drivers to mst file as only applies to sampler
  67. '05/06/95 Fonts installed on users machine
  68. '01/06/95 No choice about adding icon to prog man, altered dkgen.inc & rc file
  69. '            (custom, customhelp & speed dlg boxes need changing)
  70. '22/05/95 Code for bundling with sampler
  71. '22/05/95 Large readme need Write (will need to change dlg box in rc file)
  72. '15/05/95 No warning that directory does not exist
  73. '03/05/95 Ini file put in executable directory rather than Windows dir to stop
  74. '            clash with foreign products with same name files
  75. '
  76. '------------------------------------------------------------------------------
  77. '
  78. ' All of the defines which are used to control the flow of Setup are listed here.
  79. '
  80. 'SCRUNGED_OR_TEXT              Product will run in scrunge mode not test mode.
  81. '                                                   If not defined then assumes scrunged.
  82. '                       The ini file is different.
  83. ' WITH_UNINSTALL        Installs Uninstall with the product.
  84. ' WITH_ORDERING_INFO    Installs Ordering Information with the product.
  85. ' WITH_SAMPLER          Installs the Sampler with the product.
  86. '                       This sampler goes into the product directory.
  87. '                       This sampler has a Custom Menu.
  88. ' WITH_FULL_SAMPLER     Installs the full Sampler with the product.
  89. '                       This sampler goes into the sampler directory \DKMM\SAMPLER.
  90. '                       This sampler has its own icon and can be uninstalled separately.
  91. '                       The sampler files are listed in the SAMPBIN section of setup.inf.
  92. ' NEEDS_MUSEUM_LIFT     Installs the museum lift. (DKSWTCH.EXE)
  93. ' NEEDS_WIN32S          Installs Win32s.
  94. ' NEEDS_WING            Installs WinG.
  95. ' NEEDS_QTW             Installs QuickTime for Windows using Apple's own installer.
  96. ' NEEDS_VFW             Installs Video for Windows.
  97. ' NEEDS_SOUND           Installs ADPCM sound drivers.
  98. '
  99. '------------------------------------------------------------------------------
  100. ''$DEFINE DEBUG
  101. '$INCLUDE 'dkgen.inc'
  102. '
  103.  
  104. '$IFDEF NEEDS_WIN32S
  105.     ' Include extra Win32s specific routines
  106.     '$INCLUDE 'win32s.inc'
  107. '$ENDIF
  108.  
  109. DECLARE SUB CreateReg()
  110. DECLARE SUB Install()
  111. DECLARE SUB AddFilesToCopyList(szInstallType$)
  112. DECLARE SUB UpdateFonts()
  113. DECLARE FUNCTION IsCDROMDrive LIB "dkutils.dll" (wDrive%) As INTEGER
  114. DECLARE FUNCTION DeleteFiles LIB "dkutils.dll" (szDiffPath$, szProdName$, szDKREgIni$) AS INTEGER
  115. DECLARE FUNCTION DeleteDir LIB "dkutils.dll" (szDiffPath$) AS INTEGER
  116. 'Function moved to the file DKGen.INC
  117. 'DECLARE FUNCTION DeleteSection LIB "dkutils.dll" (szProdName$, szDKREgIni$) AS INTEGER
  118. DECLARE FUNCTION TestForCirrus LIB "dkutils.dll" () As INTEGER
  119. DECLARE FUNCTION GetCdVolumeLabel LIB "dkutils.dll" ( szCdVolumeLabel$, szCdDrive$ ) As INTEGER
  120. DECLARE FUNCTION InstallFont LIB "dkutils.dll" (szFont$) AS INTEGER
  121.  
  122.  
  123. Init:
  124.    Initialise STR_PRODUCTNAME, DEFAULT_INSTALL_PATH, STR_MSGCAPTION
  125.  
  126. WelcomeDlg:
  127.     if Welcome() = NAV_BACK then
  128.         ' Don nothing - cant go back
  129.     end if
  130.  
  131.     if TestSystem() = NAV_BACK then
  132.         goto WelcomeDlg
  133.     end if
  134.  
  135.  
  136.     '+++
  137.     '$IFDEF NEEDS_WIN32S
  138.  
  139.         if bInstalledWin32s = 0 then
  140.                 IF OnWindowsNT() THEN
  141.                 else
  142.                     goto InstallWin32s
  143.                 endif
  144.         endif
  145.  
  146.         FinishedWin32s:
  147.     '$ENDIF
  148.     '---
  149.  
  150.     '+++
  151.     '$IFDEF NEEDS_QTW
  152.  
  153.         ret% = InstallQTW()     ' Install QuickTime for Windows
  154.     '$ENDIF
  155.     '---
  156.  
  157.     '   TestCirrus:
  158.     if TestForCirrus() = 1 then
  159.         dButton = DoMsgBox(STR_CIRRUS, szMsgCaption$, MB_OK+MB_TASKMODAL+MB_ICONINFORMATION)
  160.     end if
  161.  
  162.  
  163.     '$IFDEF NEEDS_SOUND
  164.         ' Update the Sound driver ini entries
  165.         if UpdateADPCMDrivers() = NAV_BACK then
  166.             goto WelcomeDlg
  167.         end if
  168.     '$ENDIF
  169.  
  170. ' The Developer Dialogue stuff...
  171. '$IFDEF SCRUNGED_OR_TEXT
  172. beginDevelopDiag:
  173.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_DEVELOPER, "FQuitDlgProc", 0, "")
  174.     select case szButton
  175.     case "REACTIVATE"
  176.         goto beginDevelopDiag
  177.     case "EXIT" , "CANCEL"
  178.         bscrunged=0 ' Text Mode
  179.         UIPop 1
  180.     case "CONTINUE"
  181.         bscrunged=1 ' Scrunge Mode
  182.         UIPop 1
  183.     end select
  184. '$ELSE
  185.     bscrunged=1
  186. '$ENDIF
  187.  
  188. ExpressCustomDlg:
  189.     ' defaults to Express
  190.     'if szExpressCustomChoice = "EXPRESS" then
  191.     '    SetSymbolValue "RadioDefault", "1"
  192.     'else
  193.     '    SetSymbolValue "RadioDefault", "1"
  194.     'end if
  195.  
  196. ECDlgLoop:
  197.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_SPEED, "FRadioDlgProc", DLG_WHIZZHELP, PROC_HELP)
  198.  
  199.     select case szButton
  200.     case "REACTIVATE"
  201.         goto ECDlgLoop
  202.     case "BACK"
  203.         UIPop 1
  204.         goto WelcomeDlg
  205.     case "CONTINUE" ' Install
  206.         UIPop 1
  207.         if GetSymbolValue("ButtonChecked") = "1" then
  208.             szExpressCustomChoice = "EXPRESS"
  209.             goto ExpressInstallLoop
  210.         else
  211.             szExpressCustomChoice = "CUSTOM"
  212.             goto CustomInstallLoop
  213.         end if
  214.     case "EXIT" , "CANCEL"
  215.         AskQuit
  216.         goto ECDlgLoop
  217.     end select
  218.  
  219.  
  220. CustomInstallLoop:
  221. GetPathDlg:
  222.     SetSymbolValue "EditTextIn", szDestPath
  223.     szOldDestPath = szWinDrive + ":" + DEFAULT_INSTALL_PATH
  224.     SetSymbolValue "EditFocus", "ALL"
  225.  
  226. GetPathDlgLoop:
  227.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_DESTPATH, "FEditDlgProc", DLG_PATHHELP, PROC_HELP)
  228.  
  229.     select case szButton
  230.     case "REACTIVATE"
  231.         goto GetPathDlgLoop
  232.  
  233.     case "BACK"
  234.         UIPop 1
  235.         szDestPath = szOldDestPath
  236.         ClearCopyList
  237.         goto ECDlgLoop
  238.  
  239.     case "CONTINUE"
  240.         UIPop 1
  241.         szDestPath = GetSymbolValue("EditTextOut")
  242.  
  243.         ' Add backslash if missing
  244.         if mid$(szDestPath, 2, 1) = ":" and mid$(szDestPath, 3, 1) <> "\" then
  245.             szTemp$ = mid$(szDestPath, 1, 2) + "\" + mid$(szDestPath, 3, len(szDestPath)-2)
  246.             szDestPath = szTemp
  247.         end if
  248.  
  249.         ' Add drive letter and :\ if missing
  250.         if mid$(szDestPath, 2, 1) <> ":" then
  251.             if mid$(szDestPath, 1,1) <> "\" then
  252.                 szDestPath = mid$(szWinPath, 1,1) + ":\" + szDestPath
  253.             else
  254.                 szDestPath = mid$(szWinPath, 1,1) + ":" + szDestPath
  255.             end if
  256.         elseif IsDriveValid(mid$(szDestPath, 1,1)) = 0 then
  257.             szDestPath = szOldDestPath
  258.             UIPop 1
  259.             BadPath
  260.             goto GetPathDlg
  261.         end if
  262.  
  263.         slength% = len(szDestPath)
  264.  
  265.         'Check dir names not > 8 chars
  266.         dirlength% = 0
  267.         i% = 3
  268.         while i% <> slength%
  269.             i% =i%+1
  270.             dirlength% = dirlength% +1
  271.             if mid$(szDestPath, i%, 1)="\" then
  272.                 if dirlength% > 9 then
  273.                     szDestPath = szOldDestPath
  274.                     dButton = DoMsgBox( STR_DIRTOOLONG, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  275.                     goto GetPathDlg
  276.                  else
  277.                     dirlength% = 0
  278.                 endif
  279.             end if
  280.         wend
  281.         if dirlength% > 8 then
  282.             szDestPath = szOldDestPath
  283.             dButton = DoMsgBox( STR_DIRTOOLONG, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  284.             goto GetPathDlg
  285.         endif
  286.  
  287.  
  288.         ' check for "foreign" chars in path
  289.         found% = 0
  290.         for i% = 1 to slength%
  291.             if asc(mid$(szDestPath, i%, 1)) > 126 then
  292.                 found% = 1
  293.             end if
  294.         next i%
  295.         if found% = 1 then
  296.             szDestPath = szOldDestPath
  297.             UIPop 1
  298.             BadPath
  299.             goto GetPathDlg
  300.         end if
  301.  
  302.         wDrive% = asc(mid$(szDestPath, 1,1)) - asc("A")
  303.         if IsCDROMDrive(wDrive%) > 0 then
  304.             szDestPath = szOldDestPath
  305.             UIPop 1
  306.             BadPath
  307.             goto GetPathDlg
  308.         end if
  309.  
  310.         if IsDriveNetwork(mid$(szDestPath,1,1)) = 1 then
  311.             szDestPath = szOldDestPath
  312.             UIPop 1
  313.             NetworkDrive
  314.             goto GetPathDlg
  315.         end if
  316.  
  317.         ' Put in to avoid a:\ crash below
  318.         if mid$(szDestPath,1,3) = "A:\" then
  319.             szDestPath = szOldDestPath
  320.             UIPop 1
  321.             BadPath
  322.             goto GetPathDlg
  323.         end if
  324.  
  325.         ' IsDirWritable() Crashes on Win95 if looking at A:\ with no disk in!
  326.         if IsDirWritable(szDestPath) = 0 then
  327.             szDestPath = szOldDestPath
  328.             UIPop 1
  329.             BadPath
  330.             goto GetPathDlg
  331.         end if
  332.  
  333.  
  334.   '      if DoesDirExist(szDestPath) = 0 then
  335.   '          dButton = DoMsgBox( STR_DIRNOTEXIST, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  336.   '          if dButton = 7 then
  337.   '              goto GetPathDlg
  338.   '          end if
  339.   '      end if
  340.  
  341.         UIPop 1
  342.  
  343.     case "EXIT" , "CANCEL"
  344.         AskQuit
  345.         goto GetPathDlg
  346.     end select
  347.  
  348. GetCustomChoicesDlg:
  349.     SetSymbolValue "CheckItemsState", ""
  350. '    AddListItem "CheckItemsState", szMinimalInstall
  351. '    AddListItem "CheckItemsState", szAddPMItem
  352. GetCustomChoicesLoop:
  353.  
  354.     ClearCopyList
  355. '    if szMinimalInstall = "OFF" then
  356.         AddFilesToCopyList "FULL"
  357. '    else
  358. '        AddFilesToCopyList "MINIMAL"
  359. '    end if
  360.  
  361.     dDestDrive = asc(mid$(szDestPath, 1,1)) - asc("A")+1
  362.     dWinDrive = asc(mid$(szWinPath, 1,1)) - asc("A")+1
  363.  
  364.     SetSymbolValue "DriveStatusText", ""
  365.     AddListItem "DriveStatusText", mid$(szDestPath, 1,1) + ":"
  366.     AddListItem "DriveStatusText", str$(GetDiskSpaceNeeded(dDestDrive) / 1024) + " K"
  367.     AddListItem "DriveStatusText", str$(GetFreeSpaceForDrive(mid$(szDestPath, 1,1))/1024) + " K"
  368.  
  369.     if dDestDrive = dWinDrive then
  370.         AddListItem "DriveStatusText", ""
  371.         AddListItem "DriveStatusText", ""
  372.         AddListItem "DriveStatusText", ""
  373.     else
  374.         AddListItem "DriveStatusText", mid$(szWinPath, 1,1) + ":"
  375.         AddListItem "DriveStatusText", str$(GetDiskSpaceNeeded(dWinDrive)/ 1024 ) + " K"
  376.         AddListItem "DriveStatusText", str$(GetFreeSpaceForDrive(mid$(szWinPath, 1,1))/1024) + " K"
  377.     end if
  378.  
  379.     AddListItem "DriveStatusText", szDestPath
  380.  
  381. ChooseInstall:
  382.  
  383.     szButton = UIStartDlg(CUIDLL_FILENAME, DLG_CUSTOM, "FCustInstDlgProc", DLG_CUSTOMHELP, PROC_HELP)
  384.  
  385. '    szMinimalInstall = GetListItem("CheckItemsState", 1)
  386. '    szAddPMItem = GetListItem("CheckItemsState", 2)
  387.  
  388.     select case szButton
  389.     case "REACTIVATE"
  390.         goto GetCustomChoicesLoop
  391.     case "BACK"
  392.         UIPop 1
  393.         goto GetPathDlg
  394.     case "CONTINUE"
  395.         UIPop 1
  396.     case "EXIT" , "CANCEL"
  397.         AskQuit
  398.         goto GetCustomChoicesLoop
  399.     end select
  400.  
  401.     ClearCopyList
  402. '    if szMinimalInstall = "OFF" then
  403.         AddFilesToCopyList "FULL"
  404. '    else
  405. '        AddFilesToCopyList "MINIMAL"
  406. '    end if
  407.     goto CommonInstallLoop
  408.  
  409. ExpressInstallLoop:
  410.     AddFilesToCopyList "FULL"
  411.     goto CommonInstallLoop
  412.  
  413. CommonInstallLoop:
  414.     InitCommonInstall
  415.  
  416.     if szMinimalInstall = "ON" and GetFreeSpaceForDrive(mid$(szDestPath,1,1)) < MINIMUM_DISK_SPACE then
  417.         error ERR_NODISKSPACE
  418.     elseif GetFreeSpaceForDrive(mid$(szDestPath,1,1)) < GetDiskSpaceNeeded( asc(mid$(szDestPath, 1,1))-asc("A")+1 ) then
  419.         error ERR_NODISKSPACE
  420.     end if
  421.  
  422.     '+++
  423.     '$IFDEF NEEDS_WING
  424.  
  425.         UpdateWinGDrivers
  426.     '$ENDIF
  427.     '---
  428.  
  429.     '+++
  430.     '$IFDEF NEEDS_VFW
  431.  
  432.         ' Don't need to install VFW on Windows 95, it is already there.
  433.         if not OS_Windows95 then
  434.  
  435.             UpdateIndeoAVIDrivers
  436.         end if
  437.  
  438.     '$ENDIF
  439.     '---
  440.  
  441.     UpdateFonts ' Installs specific fonts
  442.  
  443.     Install     ' Installs all of the necessary files.
  444.  
  445.     dCursor = ShowWaitCursor()
  446.  
  447.     ' Always create the DK Registry and enter the details
  448.     CreateIniKeyValue "Win.ini", "MMAPP", WIN_INI_ENTRY, szWinDrive+":"+DKREG_INI_PATH, cmoOverwrite
  449.     CreateReg
  450.  
  451.     ' Get the current window handle for setting its properties later
  452.     hwndSetup = GetActiveWindow
  453.  
  454. '******************************************************************************************************************************
  455. '******************************************************************************************************************************
  456. ' Here is the code for DirectX...
  457. 'It requires the program simple.exe to be copied to the temp directory, along with the DirectX DLL's and the DirectX direcory to be located under DKSetup
  458. '$IFDEF NEEDS_DIRECTX
  459.  
  460.         if OS_Windows95 then
  461.                 ' NT v4 (looks like Win95) Has DirectX Installed... Do NOT install Win95 DirectX II
  462.                 if OnWindowsNT() then
  463.                 else
  464.                     ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  465.                     szDirectCommand="SetupDX2.exe "+szSrcSetupPath
  466.                     intreply=RUN (szDirectCommand)
  467.  
  468.                     ' Wait for Direct X Install to Finish.
  469.                     szErrorCode = ""
  470.                     WHILE szErrorCode = ""
  471.                         ' Look in MMAPP,INI for the DKDirectX group and check the ErrorCode
  472.                         szErrorCode = GetIniKeyString (szWinDrive+":"+DKREG_INI_PATH, "DKDirectX", "ErrorCode")
  473. 'dButton = DoMsgBox( szErrorCode,"DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  474.                      WEND
  475. 'dButton = DoMsgBox( "Ended the loop","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  476. 'intReply = LEN(szErrorCode)
  477.                      szReply = MID$(szErrorCode,1,1)
  478. 'dButton = DoMsgBox( szReply,"DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  479.                      if szReply = "-" then
  480.                         dButton = DoMsgBox( "An error occured while installing DirectX","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  481.                         ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  482.                         error ERR_EXITFAIL
  483.                     else
  484. 'dButton = DoMsgBox( "No errors","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  485.                         'ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  486.                         if szReply = "1" then
  487. 'dButton = DoMsgBox( "Restart","DirectX Setup", MB_OK+MB_TASKMODAL+MB_ICONHAND)
  488.                                 bInstalledWin32s = 1
  489.                         endif
  490.                     endif
  491.                     ret% = DeleteSection("DKDirectX", szWinDrive+":"+DKREG_INI_PATH)
  492.                 endif
  493.         endif
  494.  
  495. '$ENDIF
  496. '******************************************************************************************************************************
  497. '******************************************************************************************************************************
  498.  
  499.     CreateProgmanGroup STR_COMPANYNAME, "", cmoNone
  500.     ShowProgmanGroup   STR_COMPANYNAME, 1, cmoNone
  501.  
  502.     ' Set the main window properties to bring the main window to the front.
  503.     ' This is so the user cannot start the app now, but will see the prog group after setup!
  504.     i% = SetWindowPos(hwndSetup, HWND_TOP, 0, 0, 0, 0, SWP_NOSIZE+SWP_NOMOVE)
  505.  
  506.  
  507. '+++
  508. '$IFDEF WITH_SAMPLER
  509.  
  510. '    if szMinimalInstall = "ON" then
  511. '        szSamplerPath$ = MakePath( mid$(szSrcSetupPath, 1, (len(szSrcSetupPath) - len(SOURCE_SETUP_SUBDIR))-1), SAMPLER_PATH)
  512. '        szSamplerPath$ = MakePath(szSamplerPath$, SAMPLER_EXE_FILE)
  513. '        szInf$ = MakePath(szSrcBinPath, APPLICATION_MENU_FILE) + " " + MakePath(szSrcBinPath, APPLICATION_EXE_FILE) + " " + MakePath(szSrcBinPath, APPLICATION_PENGE_FILE) + " " + szSamplerPath$
  514. '        CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  515. '        CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szSrcBinPath, APPLICATION_README_FILE), "", cmoOverwrite
  516. '    else
  517.         szSamplerPath$ = MakePath(szDestPath, SAMPLER_EXE_FILE)
  518.         szInf$ = MakePath(szDestPath, APPLICATION_MENU_FILE) + " " + MakePath(szDestPath, APPLICATION_EXE_FILE) + " " + MakePath(szDestPath, APPLICATION_PENGE_FILE) + " " + szSamplerPath$
  519.         CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  520.         CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szDestPath, APPLICATION_README_FILE), "", cmoOverwrite
  521.         '$IFDEF WITH_ORDERING_INFO
  522.         CreateProgmanItem STR_COMPANYNAME, STR_ORDER, EDITOR_EXE + MakePath(szWinDrive + ":" + DKREG_INI_DIR, ORDER_FILE), "", cmoOverwrite
  523.         '$ENDIF
  524. '    end if
  525.  
  526. '$ELSE
  527.     'NO SAMPLER
  528. '    if szMinimalInstall = "ON" then
  529. '        szInf$ = MakePath(szSrcBinPath, APPLICATION_EXE_FILE) + " " + MakePath(szSrcBinPath, "dkpage")'APPLICATION_PENGE_FILE)
  530. '        CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  531. '        CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szSrcBinPath, APPLICATION_README_FILE), "", cmoOverwrite
  532. '    else
  533.         szInf$ = MakePath(szDestPath, APPLICATION_EXE_FILE) + " " + MakePath(szDestPath, "dkpage")'APPLICATION_PENGE_FILE)
  534.         CreateProgmanItem STR_COMPANYNAME, STR_PRODUCTNAME, szInf, szInf, cmoOverwrite
  535.         CreateProgmanItem STR_COMPANYNAME, STR_README, EDITOR_EXE + MakePath(szDestPath, APPLICATION_README_FILE), "", cmoOverwrite
  536.  
  537.         '$IFDEF WITH_ORDERING_INFO
  538.         CreateProgmanItem STR_COMPANYNAME, STR_ORDER, EDITOR_EXE + MakePath(szWinDrive + ":" + DKREG_INI_DIR, ORDER_FILE), "", cmoOverwrite
  539.         '$ENDIF
  540.  
  541.         '$IFDEF WITH_FULL_SAMPLER
  542.         CreateProgmanItem STR_COMPANYNAME, STR_SAMPLER, MakePath(szFullSampPath, SAMPLER_EXE_FILE), "", cmoOverwrite
  543.         CreateProgmanItem STR_COMPANYNAME, STR_SAMPLER_README, MakePath(szFullSampPath, SAMPLER_README_FILE), "", cmoOverwrite
  544.         '$ENDIF
  545.  
  546. '    end if
  547. '$ENDIF
  548. '---
  549.  
  550.     '+++
  551.     '$IFDEF WITH_UNINSTALL
  552.  
  553.         'Uninstall icon
  554.         szDKUninstall$ = szWinDrive + ":" +  DKREG_INI_DIR
  555.         szInf$ = MakePath( szDKUninstall, UNINSTALL_EXE_FILE)
  556.         CreateProgmanItem STR_COMPANYNAME, STR_UNINSTALL, szInf, szInf, cmoOverwrite
  557.     '$ENDIF
  558.     '---
  559.  
  560. '$IFDEF DEBUG
  561.  
  562.     DumpCopyList MakePath(szDestPath, "copylist.txt")
  563.  
  564. '$ENDIF
  565.  
  566.  
  567.     RestoreCursor( dCursor )
  568.  
  569.     If EndCommonInstall( APPLICATION_README_FILE, 0, EDITOR_EXE ) = NAV_EXIT then
  570.         stop
  571.         end
  572.     endif
  573.  
  574. quit:
  575.     on error goto quit
  576.  
  577.     select case ERR
  578.  
  579.     case 0
  580.         hDlg = DLG_SUCCESS
  581.     case STFQUIT
  582.         hDlg = DLG_BADEXIT
  583.     case ERR_NODISKSPACE
  584.         hDlg = DLG_NODISKSPACE
  585.     case else
  586.         hDlg = DLG_ABORT
  587.     end select
  588.  
  589.     UIPop 10
  590. quit2:
  591.     szButton = UIStartDlg(CUIDLL_FILENAME, hDlg, "FInfo0DlgProc", 0, "")
  592.     select case szButton
  593.     case "REACTIVATE"
  594.         goto quit2
  595.     end select
  596.  
  597.     UIPop 1
  598.     DeInitialise
  599.     stop
  600.     end
  601.  
  602. quitError:
  603.     dButton = DoMsgBox (STR_QUITERROR, STR_MSGCAPTION, MB_OK+MB_TASKMODAL+MB_ICONHAND)
  604.     DeInitialise
  605.     stop
  606.     end
  607.  
  608.  
  609. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  610.  
  611. Sub Install() STATIC
  612.  
  613.     cursor% = ShowWaitCursor()
  614.     CreateDir szDestPath, cmoNone
  615.  
  616.     '$IFNDEF NEEDS_WIN32S
  617.         SetRestartDir szDestPath    '   Already set if needs Win32s
  618.     '$ENDIF
  619.  
  620.     RestoreCursor(cursor%)
  621.  
  622.     CopyFilesInCopyList  'creates dir even if min install
  623.  
  624.     '+++
  625.     '$IFDEF NEEDS_VFW
  626.  
  627.         ' Don't need to install VFW on Windows 95, it is already there.
  628.         if OS_Windows95 = 0 then
  629.  
  630.             Run ("regedit.exe /s " + MakePath(szWinPath, "mplayer.reg"))
  631.             Run ("regedit.exe /s " + MakePath(szWinSysPath, "OLE2.reg"))
  632.  
  633.             '+++
  634.             '$IFNDEF NEEDS_WIN32S
  635.                 ' NOT with WIN32S
  636.                 Run ("regedit.exe /s " + MakePath(szWinSysPath, "cleanup.reg"))
  637.             '$ENDIF
  638.             '---
  639.  
  640.             Run ("profdisp.exe")
  641.  
  642.         end if
  643.     '$ENDIF
  644.     '---
  645.  
  646.     if INI_FILE_SOURCE = "AppPath" then
  647.         szAppINIPath = MakePath(szDestPath, APPLICATION_INI_FILE)
  648.     else
  649.         szAppINIPath = MakePath(szWinPath, APPLICATION_INI_FILE)
  650.     end if
  651.  
  652.        '=d:\                                    =d:\dksetup                =dksetup
  653.     szPengePath = mid$(szSrcSetupPath, 1,len(szSrcSetupPath)-len(SOURCE_SETUP_SUBDIR)-2) ' -2 removes backslash
  654. '+++
  655. '$IFDEF WITH_SAMPLER
  656.         szSampINIPath = MakePath(szDestPath, SAMPLER_INI_FILE)
  657.         'data =
  658.         szSampData = szPengePath + "\" + SAMPLER_PATH
  659.         CreateIniKeyValue szSampINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, szSampData, cmoOverwrite
  660.         'volumelabel =
  661.         szCdDrive$ = mid$( szSrcSetupPath, 1, 1 )
  662.         szCdVolumeLabel$ = STRING$( 20, 32 )
  663.         if( GetCdVolumeLabel( szCdVolumeLabel$, szCdDrive$ ) ) then
  664.             CreateIniKeyValue MakePath(szDestPath, SAMPLER_INI_FILE), PRODUCT_INI_DIR_SECTION_NAME, "VolumeLabel", szCdVolumeLabel$, cmoOverwrite
  665.         endif
  666. '$ENDIF
  667. '---
  668.  
  669. '+++
  670. '$IFDEF WITH_FULL_SAMPLER
  671.         szSampINIPath = MakePath(szFullSampPath, SAMPLER_INI_FILE)
  672.         'data =
  673.         szSampData = szPengePath + "\" + SAMPLER_PATH
  674.         CreateIniKeyValue szSampINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, szSampData, cmoOverwrite
  675. ' Don't want to force a specific cd for the full sampler!
  676. '        'volumelabel =
  677. '        szCdDrive$ = mid$( szSrcSetupPath, 1, 1 )
  678. '        szCdVolumeLabel$ = STRING$( 20, 32 )
  679. '        if( GetCdVolumeLabel( szCdVolumeLabel$, szCdDrive$ ) ) then
  680. '            CreateIniKeyValue MakePath(szDestPath, SAMPLER_INI_FILE), PRODUCT_INI_DIR_SECTION_NAME, "VolumeLabel", szCdVolumeLabel$, cmoOverwrite
  681. '        endif
  682. '$ENDIF
  683. '---
  684.  
  685. '+++
  686. ''$IFDEF SCRUNGED
  687. if bscrunged then
  688. '    if szMinimalInstall = "OFF"  then
  689.         'data =
  690.         ' Enter the data section into the product.ini file with the backslash... (data=?:\)
  691.         CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, szPengePath+"\", cmoOverwrite
  692. '    endif
  693.  
  694. ''$ELSE
  695. else
  696.     'DEBUG VERSION
  697.     'data =
  698.     CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, PRODUCT_INI_DIR_ENTRY_NAME, MakePath(szPengePath,"data"), cmoOverwrite
  699.     'pages =
  700. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Pages", MakePath(szPengePath,"dkpage"), cmoOverwrite
  701. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Scrunge", "0", cmoOverwrite
  702. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Developer", "1", cmoOverwrite
  703. '    CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Debug", "1", cmoOverwrite
  704.  
  705. ''$ENDIF
  706. endif
  707. '---
  708.  
  709. if APPLICATION_EXE_FILE = "sampler.exe" then
  710.     ' Add version entry from version.ini if found
  711.     szSampVersion = GetIniKeyString( MakePath( szSrcBinPath, "VERSION.INI" ), "VERSION", "VERSION" )
  712.     if len( szSampVersion ) > 0 then
  713.         CreateIniKeyValue szAppINIPath, PRODUCT_INI_DIR_SECTION_NAME, "Version", szSampVersion, cmoOverwrite
  714.     endif
  715. endif
  716.  
  717.     ' Add any custom ini entries in the function in product.inc
  718.     CustomIniEntries
  719.  
  720. End Sub
  721.  
  722. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  723. Sub AddFilesToCopyList(szInstallType$) STATIC
  724.     cursor% = ShowWaitCursor()
  725.  
  726.     szDKUninstall$ = szWinDrive + ":" +  DKREG_INI_DIR
  727.  
  728.     'Shared Files : For ORDER.WRI & FOR MUSEUM TITLES (DKSWTCHW.EXE) Put in \MMAPP
  729.     '$IFDEF WITH_ORDERING_INFO OR NEEDS_MUSEUM_LIFT
  730.     AddSectionFilesToCopyList SETUP_INI_SH_BINARIES_SECTION_NAME, szSrcBinPath, szDKUninstall
  731.     '$ENDIF
  732.  
  733.     '+++
  734.     '$IFDEF WITH_FULL_SAMPLER
  735.  
  736.         AddSectionFilesToCopyList SAMPLER_BINARIES_SECTION_NAME, szSrcBinPath, szFullSampPath
  737.  
  738.     '$ENDIF
  739.     '---
  740.  
  741.     '+++
  742.     '$IFDEF WITH_UNINSTALL
  743.  
  744.         AddSectionFilesToCopyList "UNINSTALL", szSrcBinPath, szDKUninstall
  745.  
  746.     '$ENDIF
  747.     '---
  748.  
  749. '+++
  750. '$IFDEF SCRUNGED_OR_TEXT
  751.  
  752.     if bscrunged = 0 then
  753.         AddSectionFilesToCopyList "BIN TEXT", szSrcBinPath + "\TEXT", szDestPath
  754.     else
  755.         AddSectionFilesToCopyList "BIN SCRUNGED", szSrcBinPath + "\SCRUNGE", szDestPath
  756.     end if
  757.  
  758. '$ELSE
  759.     if OS_Windows95 = 0 then  'I6 bit
  760.         AddSectionFilesToCopyList "BIN 16", szSrcBinPath + "\DKCode16", szDestPath
  761.     else
  762.         AddSectionFilesToCopyList "BIN 32", szSrcBinPath, szDestPath
  763.     end if
  764.  
  765.  
  766. '$ENDIF
  767. '---
  768. '    select case szInstallType
  769. '    case "FULL"
  770.     AddSectionFilesToCopyList SETUP_INI_BINARIES_SECTION_NAME, szSrcBinPath, szDestPath
  771.  
  772. '    case "MINIMAL"
  773. '        ' nothing
  774. '    end select
  775.  
  776.  
  777.     '+++
  778.     '$IFDEF NEEDS_WING
  779.         AddSectionFilesToCopyList SETUP_INI_WING_BINARIES_NAME, szSrcBinPath, szWinSysPath
  780.         if (OnWIndowsNT()) then
  781.             ' WinG32.DLL must be in Winnt\System32
  782.             szSystem32Path = GetRealWindowsSysDir
  783.             AddSectionFilesToCopyList SETUP_INI_WING32_BINARIES_NAME, szSrcBinPath, szSystem32Path
  784.         else
  785.             AddSectionFilesToCopyList SETUP_INI_WING32_BINARIES_NAME, szSrcBinPath, szWinSysPath
  786.         endif
  787.     '$ENDIF
  788.     '---
  789.  
  790.     '+++
  791.     '$IFDEF NEEDS_VFW
  792.  
  793.         ' Don't need to install VFW on Windows 95, it is already there.
  794.         if OS_Windows95 = 0 then
  795.  
  796.             AddSectionFilesToCopyList "VfW Runtime", szSrcBinPath, szWinSysPath
  797.             AddSectionFilesToCopyList "MPlayer", szSrcBinPath, szWinPath
  798.             AddSectionFilesToCopyList "AVICodecs", szSrcBinPath, szWinSysPath
  799.  
  800.             '+++
  801.             '$IFNDEF NEEDS_WIN32S
  802.                 ' Win32s has its own 32-bit OLE
  803.                 AddSectionFilesToCopyList "OLE2", szSrcBinPath, szWinSysPath
  804.             '$ENDIF
  805.             '---
  806.         end if
  807.     '$ENDIF
  808.  
  809.     '$IFDEF NEEDS_SOUND
  810.         ' Don't need to install Sound on Windows 95, it is already there.
  811.         if OS_Windows95 = 0 then
  812.             if fSystemUpdated = 1 then
  813.                 AddSectionFilesToCopyList "ACM Drivers", szSrcBinPath, szWinSysPath
  814.             end if
  815.         end if
  816.     '$ENDIF
  817.  
  818.     RestoreCursor(cursor%)
  819. End Sub
  820.  
  821. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  822. Sub UpdateFonts() STATIC
  823.     ' Check TT enabled
  824.     MakeListFromSectionFilename "Fonts_list", "Fonts"
  825.  
  826.     listLength% = GetListLength("Fonts_list")
  827.     if listLength% > 0 then
  828.         ' Check to see if the list is just a placeholder or a real list.
  829.         szFontFile$ = GetListItem("Fonts_list", 1)
  830.         if szFontFile <> "NOFONT.ZZZ" then
  831.             ' Do the Win.ini entries
  832.             RegisterFonts
  833.  
  834.             for item% = 1 to listLength%
  835.                 szFontFile = GetListItem("Fonts_list", item%)
  836.                 ' Check if exists
  837.                 ' Install font
  838.                 ret% = InstallFont(MakePath(szSrcBinPath, szFontFile))
  839.                 ' Write WIN.INI
  840.             next
  841.         end if
  842.     end if
  843. End Sub
  844.  
  845. ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  846. Sub CreateReg() STATIC
  847.  
  848.     ' The MMAPP.INI path
  849.     szDKRegIni = szWinDrive + ":" +  DKREG_INI_PATH
  850.  
  851.     if DoesFileExist( szDKRegIni, femExist) = 0 then
  852.         'dkreg.ini doesn't exist - initialize AppCount, create dir, add to InstalledApp
  853.         AppCount% = 1
  854.         CreateDir (szWinDrive+":"+DKREG_INI_DIR), cmoNone
  855.         CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  856.         szNum$=str$(AppCount%)
  857.         CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_PRODUCTNAME, cmoOverwrite
  858.         '$IFDEF WITH_FULL_SAMPLER
  859.             ' Create separate Sampler entry
  860.             AppCount% = 2
  861.             CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  862.             szNum$=str$(AppCount%)
  863.             CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_SAMPLER, cmoOverwrite
  864.         '$ENDIF
  865.     else
  866.         if DoesIniSectionExist( szDKRegIni, STR_PRODUCTNAME )=1  then
  867.             szDiffPath$=GetIniKeyString(szDKRegIni, STR_PRODUCTNAME, "Path")
  868.             if(szDestPath$  <> szDiffPath$) then
  869.                 ' product is also installed in a different dir - delete files and dir and ini section
  870.                 ret% = DeleteFiles (szDiffPath, STR_PRODUCTNAME, szDKRegIni)
  871.                 ret% = DeleteDir (szDiffPath)
  872.                 ret% = DeleteSection(STR_PRODUCTNAME, szDKRegIni)
  873.             endif
  874.             'product is installed in same dir - do nothing, has overwritten files
  875.         else
  876.               'product name does not exist - increment AppCount, add to InstalledApp
  877.                szAppCount$ = GetIniKeyString( szDKRegIni, "InstalledApp", "Applications" )
  878.                AppCount% = Val(szAppCount$) + 1
  879.                CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  880.                'assign product to first available number (maybe gaps due to deletion)
  881.                i%=1
  882.                while( GetIniKeyString( szDKRegIni, "InstalledApp",str$(i%) )<>"")
  883.                    i=i+1
  884.                wend
  885.                szNum$=str$(i%)
  886.                CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_PRODUCTNAME, cmoOverwrite
  887.         endif
  888.  
  889.         '$IFDEF WITH_FULL_SAMPLER
  890.             ' Create separate Sampler entry
  891.             if DoesIniSectionExist( szDKRegIni, STR_SAMPLER )=1  then
  892.                 szDiffPath$=GetIniKeyString(szDKRegIni, STR_SAMPLER, "Path")
  893.                 if(szFullSampPath$  <> szDiffPath$) then
  894.                     ' Sampler is installed in a different dir - delete files and dir and ini section
  895.                     ret% = DeleteFiles (szDiffPath, STR_SAMPLER, szDKREgIni)
  896.                     ret% = DeleteDir (szDiffPath)
  897.                     ret% = DeleteSection(STR_SAMPLER, szDKREgIni)
  898.                 endif
  899.                 'Sampler is installed in same dir - do nothing, will overwrite files
  900.             else
  901.                 'Sampler does not exist - increment AppCount, add to InstalledApp
  902.                 szAppCount$ = GetIniKeyString( szDKRegIni, "InstalledApp", "Applications" )
  903.                 AppCount% = Val(szAppCount$) + 1
  904.                 CreateIniKeyValue szDKRegIni, "InstalledApp", "Applications", str$(AppCount%), cmoOverwrite
  905.                 'assign product to first available number (maybe gaps due to deletion)
  906.                 i%=1
  907.                 while( GetIniKeyString( szDKRegIni, "InstalledApp",str$(i%) )<>"")
  908.                     i=i+1
  909.                 wend
  910.                 szNum$=str$(i%)
  911.                 CreateIniKeyValue szDKRegIni, "InstalledApp",ltrim$(szNum), STR_SAMPLER, cmoOverwrite
  912.             endif
  913.         '$ENDIF
  914.      endif
  915.  
  916.     CreateIniKeyValue szDKRegIni, "InstalledApp","RecentLang", LANG_DLL, cmoOverwrite
  917.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Path", szDestPath, cmoOverwrite
  918.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Company", STR_COMPANYNAME, cmoOverwrite
  919.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Readme", STR_README, cmoOverwrite
  920.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Order", STR_ORDER, cmoOverwrite
  921.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "Exe", APPLICATION_EXE_FILE, cmoOverwrite
  922.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, "1", APPLICATION_INI_FILE , cmoOverwrite  'Ini
  923. '    if szMinimalInstall = "OFF" then
  924.         MakeListFromSectionFilename "BIN_list", "BIN"
  925.         listLength% = GetListLength("BIN_list")
  926.         if listLength% > 0 then
  927.             for item% = 1 to listLength%
  928.                 szBinFile$ = GetListItem("BIN_list", item%)
  929.                 szNum$=str$(item%+1)
  930.                 CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, ltrim$(szNum), szBinFile , cmoOverwrite
  931.             next
  932.         end if
  933. '    end if
  934.  
  935. ''$IFDEF SCRUNGED_OR_TEXT
  936.         if OS_Windows95 then
  937.             MakeListFromSectionFilename "BIN_OPT_list", "BIN 32"
  938.         else
  939.             MakeListFromSectionFilename "BIN_OPT_list", "BIN 16"
  940.         end if
  941.  
  942.         listLength% = GetListLength("BIN_OPT_list")
  943.         if listLength% > 0 then
  944.             for Count% =1 to listLength%
  945.                 szBinFile$ = GetListItem("BIN_OPT_list", Count%)
  946.                 szNum$=str$(item%+1)
  947.                 CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, ltrim$(szNum), szBinFile , cmoOverwrite
  948.                 item% = item% + 1
  949.             next
  950.         end if
  951. ''$ENDIF
  952.  
  953.  
  954. '$IFDEF WITH_SAMPLER
  955.     szNum$=str$(item%+1)
  956.     CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME, ltrim$(szNum), SAMPLER_INI_FILE , cmoOverwrite
  957.     item% = item% + 1
  958. '$ENDIF
  959.  
  960.     ' Add Uninstall only files to the list
  961.     UninstallOnly( item% )
  962.  
  963.  
  964. '$IFDEF WITH_FULL_SAMPLER
  965.     ' Create entries in the sampler section
  966.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Path", szFullSampPath, cmoOverwrite
  967.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Company", STR_COMPANYNAME, cmoOverwrite
  968.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Readme", STR_SAMPLER_README, cmoOverwrite
  969.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "Exe", SAMPLER_EXE_FILE, cmoOverwrite
  970.     CreateIniKeyValue szDKRegIni, STR_SAMPLER, "1", SAMPLER_INI_FILE , cmoOverwrite  'Ini
  971. '    if szMinimalInstall = "OFF" then
  972.         MakeListFromSectionFilename "SAMP_BIN_list", "SAMPBIN"
  973.         listLength% = GetListLength("SAMP_BIN_list")
  974.         if listLength% > 0 then
  975.             for item% = 1 to listLength%
  976.                 szBinFile$ = GetListItem("SAMP_BIN_list", item%)
  977.                 szNum$=str$(item%+1)
  978.                 CreateIniKeyValue szDKRegIni, STR_SAMPLER, ltrim$(szNum), szBinFile , cmoOverwrite
  979.             next
  980.         end if
  981. '    end if
  982. '$ENDIF
  983.  
  984.     ' Add fonts to the uninstall list.
  985. '    listLength% = GetListLength("Fonts_list")
  986. '    if listLength% > 0 then
  987. '        for item% = 1 to listLength%
  988. '            szFontFile$ = GetListItem("Fonts_list", item%)
  989. '            szNum$=str$(item%)
  990. '            CreateIniKeyValue szDKRegIni, STR_PRODUCTNAME,"F"+ltrim$(szNum), szFontFile, cmoOverwrite
  991. '        next
  992. '    end if
  993.  
  994. End Sub
  995.  
  996.